package com.achao.controller;

import com.achao.javabeans.dto.Result;
import com.achao.service.MyTestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: achao
 * @DateTime: 2022/8/18 22:12
 * @Description: TODO
 */

@RestController
@RequestMapping("/test")
public class MyTestController {

    @Autowired
    private MyTestService testService;

    @PostMapping("/add")
    public Result addTest(String name){
        System.out.println("我进来了");
        testService.addTest(name);
        return Result.success("成功");
    }
}
